<?php
// UltraMemo Project - Quiz.php -- simple spaced repetition engine using
//    google doc spreadsheet as data source
//
// 11/16/09 initial creation - Scott Szretter


//  this url in a browser lets you see the headers, values, etc. for a sheet/worksheet
//  http://spreadsheets.google.com/feeds/list/key/worksheetId/private/full

// get private data (see SamplePrivateData.php)


// class autoloader
//function __autoload($class_name) {
//    require_once $class_name . '.php';
//}


require_once('../PrivateData.php');
require_once('GData.php');
$GData = new GData();
$GData->GDataUser = $user; //from privatedata.php
$GData->GDataPass = $pass; //from privatedata.php
$GData->GDataAuthenticate();
$GData->GDataSSKey=$sheetKey; //from privatedata.php
$GData->GDataWkShtID=$worksheetKey; //from privatedata.php


// if they just answered a question, update the question
if(isset($_GET['ans']) && isset($_GET['qid']))
{
    include("Quiz_UpdateQuestion.php");
}

//show a question
include("Quiz_ShowQuestion.php");


?>